class MvsController < ApplicationController
  def index
    @song_tags = SongTag.ordered
    @song_tag_max_pages, @song_tag_init_pages = Song.init_and_max_pages
    # 按照 is_shown排序, 让有头像的排在前面
    @songs = Song.ordered.where(song_tag: params[:song_tag_id] ||= 1).page(params[:page] ||= 1).per(10).each_slice(5)
    
    respond_to do |format|
      format.html
      format.js
    end
  end
end
